package com.imau.brand.common.entity;

/**
 * 响应的状态码
 *
 */

public enum ResultCode {

    SUCCESS(true,"操作成功",10000),
    SERVER_ERROR(false,"系统异常",9999),
    FAIL(false,"操作失败",10001),
    UNAUTHORIZED(false,"权限不足",10003),
    NOT_FOUND(false,"资源不存在",10004),
    INTERNAL_SERVER_ERROR(false,"服务器内部错误",500),
    BAD_REQUEST(false,"请求参数错误",400),

    ;
    /**操作是否成功标记位*/
    private boolean success;
    /**响应消息*/
    private String messge;
    /**响应状态码*/
    private int code;

    ResultCode(boolean success, String messge, int code) {
        this.success = success;
        this.messge = messge;
        this.code = code;
    }

    public boolean getSuccess() {
        return success;
    }

    public String getMessge() {
        return messge;
    }

    public int getCode() {
        return code;
    }
}
